package com.ahy231.dto;

/**
 * @author ahy231
 * @date 2021/7/24 10:04
 * @description 返回状态码
 */
public enum ResultCode {
    SUCCESS(2000, "处理成功"),
    FAILED(4000, "处理失败"),
    FAILED_LOGIN(4004, "登录失败"),
    API_PARAMETER_ERROR(5000, "参数错误"),
    UNEXPECTED_ERROR(9999, "未知错误"),
    REFUSE_REQUEST(7777, "拒绝访问");

    private final int code;
    private final String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
